N=1000000;
p=4/N*length(find(sum(rand(2,N).^2)<1))